<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<form method="post" id="form1" class="form-horizontal js-ajax-form margin-top-20" action="" onsubmit="return questionsubmit();">
			<div class="form-group">
				<label for="input-question" class="col-sm-2 control-label">问题内容<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-question" name="question">
				</div>
			</div>
			<div class="form-group">
				<label for="input-reply" class="col-sm-2 control-label">回答的内容</label>
				<div class="col-md-6 col-sm-10">
					<textarea class="form-control" name="reply" id="input-reply" ></textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10" style="text-align:center;">
					<input type="hidden" name="mid" value="{$data.mid}" />
					<input type="hidden" name="progressid" value="{$data.progressid}" />
					<button type="submit" class="btn btn-primary js-ajax-submit" style="padding: 7px 50px;">提交</button>
				</div>
			</div>
		</form>
	</div>
	
	<script src="__STATIC__/js/layer/layer.js"></script>
	<script>
		   function questionsubmit(){
				//提交
				 $.ajax({
					type: "POST",//方法类型
					dataType: "json",//预期服务器返回的数据类型
					url: "{:cmf_url('admin/template/addclass_progresspost')}" ,//url
					data: $("#form1").serialize(),
					success: function (result) {
						layer.alert(result.msg,'',function(){
							var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
							parent.layer.close(index); //再执行关闭，强制关闭弹窗
							window.parent.location.reload();

						});
					},
					error : function() {
						alert("异常！");
					}
				});
				return false;
			}
	</script>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>